import React from 'react'
import { BASE_URL } from '../../utils'

import './index.scss'

export default function NewsItem({ news }) {
  return (
    <>
      <div className="news-item" key={news.id}>
        <a href="/">
          <img src={BASE_URL + news.imgSrc} alt="" />
        </a>
        <div className="desc">
          <div className="title">{news.title}</div>
          <div className="info">
            <span>{news.from}</span>
            <span>{news.date}</span>
          </div>
        </div>
      </div>
    </>
  )
}
